package com.leetCode.easy;

/**
 * IP 地址无效化
 * 所谓无效化 IP 地址，其实就是用 "[.]" 代替了每个 "."
 */
public class DefangIPaddr {

    public static String defangIPaddr(String address) {

        String s = address.replace(".", "[.]");
        return s;
    }

    public static void main(String[] args) {
        String address = "112.222.333";
        String s = defangIPaddr(address);
        System.out.println("s = " + s);
    }
}
